#ifndef __TDP2_INLINEZLIBSTATE_HPP__
#define __TDP2_INLINEZLIBSTATE_HPP__

// This defines an allocation-free ZLib inflation state

#include "tdp2.hpp"

namespace TDP
{
	namespace Zlib
	{
#include "../zlib/inftrees.h"
#include "../zlib/inflate.h"
	}

	namespace Compression
	{
		struct InlineInflateState
		{
			Zlib::inflate_state inflateState;
			UInt8 window[32768];
			Zlib::z_stream zstream;

			static void *zalloc(void *opaque, unsigned int items, unsigned int size);
			static void *zfree(void *opaque, void *address);
		};
	}
}

#endif

